<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Translations</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Translations</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Translations model.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Andrej Jursa</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_models---translations.php.html">/models/translations.php</a> (line <span class="field"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a8">8</a></span>)
		</p>
		
				
		<pre>CI_Model
   |
   --Translations</pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<a href="#CONSTANT_VALIDATION_REGEXP" title="details" class="const-name">CONSTANT_VALIDATION_REGEXP</a> = 					<span class="var-type"> '/^[a-z]+[a-z0-9]*(\_[a-z0-9]+)*$/i'</span>

				</div>
							</div>
		</div>
	</div>


	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
									<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																												
												<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#delete_translations" title="details" class="method-name">delete_translations</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array<mixed></span>
										<a href="#get_all_for_editing" title="details" class="method-name">get_all_for_editing</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array<mixed></span>
										<a href="#get_all_for_idiom" title="details" class="method-name">get_all_for_idiom</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$idiom</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array<mixed></span>
										<a href="#get_constant_for_editing" title="details" class="method-name">get_constant_for_editing</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array<mixed></span>
										<a href="#get_translations_for_idiom" title="details" class="method-name">get_translations_for_idiom</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$idiom</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$prefix</span> = <span class="var-default">'user_custom_'</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$prefis</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#is_constant_free" title="details" class="method-name">is_constant_free</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#save_translation" title="details" class="method-name">save_translation</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$idiom</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methoddelete_translations" id="delete_translations"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">delete_translations</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a107">107</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Delete all translations for given constant name.</p>
	<ul class="tags">
				<li><span class="field">return:</span> status of operation, TRUE when anything was deleted, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			delete_translations
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$constant</span><span class="var-description">: name of constant.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_all_for_editing" id="get_all_for_editing"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_all_for_editing</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a37">37</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return all constants from database as two dimensional associative array.</p>
<p class="description"><p>First dimension is constant name, second dimension is language idiom and the value is text.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> translations array.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<mixed></span>
		<span class="method-name">
			get_all_for_editing
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_all_for_idiom" id="get_all_for_idiom"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_all_for_idiom</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a51">51</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns all translations table rows for given idiom.</p>
	<ul class="tags">
				<li><span class="field">return:</span> translations table rows.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<mixed></span>
		<span class="method-name">
			get_all_for_idiom
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$idiom</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$idiom</span><span class="var-description">: language idiom.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_constant_for_editing" id="get_constant_for_editing"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_constant_for_editing</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a66">66</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns two dimensional array of language constants texts.</p>
<p class="description"><p>First dimension is constant name, second dimension is language idiom and the value is text.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> array for given constant name.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<mixed></span>
		<span class="method-name">
			get_constant_for_editing
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$constant</span><span class="var-description">: name of constant for which the array have to be obtained from database.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_translations_for_idiom" id="get_translations_for_idiom"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_translations_for_idiom</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a18">18</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns array of all translations constants and texts from database prepended with defined prefix.</p>
	<ul class="tags">
				<li><span class="field">return:</span> array of constants.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<mixed></span>
		<span class="method-name">
			get_translations_for_idiom
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$idiom</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$prefix</span> = <span class="var-default">'user_custom_'</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$prefis</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$idiom</span><span class="var-description">: language idiom for which the translations will be loaded.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$prefis</span><span class="var-description">: constant prefix for separation from another constants, default is 'user_custom_'.</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$prefix</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_constant_free" id="is_constant_free"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">is_constant_free</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a121">121</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if there is no record in database table for given constant name.</p>
	<ul class="tags">
				<li><span class="field">return:</span> returns TRUE, if there is no record with given constant name, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			is_constant_free
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$constant</span><span class="var-description">: name of constant to check.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsave_translation" id="save_translation"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">save_translation</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a86">86</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Insert new or update existing translation for given constant, idiom and text.</p>
<p class="description"><p>This is not done in transaction!</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> status of save operation, TRUE on success, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			save_translation
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$constant</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$idiom</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$constant</span><span class="var-description">: name of constant.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$idiom</span><span class="var-description">: language idiom.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$text</span><span class="var-description">: language translation text.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constCONSTANT_VALIDATION_REGEXP" id="CONSTANT_VALIDATION_REGEXP"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">CONSTANT_VALIDATION_REGEXP</span>
			 = <span class="const-default"> '/^[a-z]+[a-z0-9]*(\_[a-z0-9]+)*$/i'</span>
			(line <span class="line-number"><a href="../__filesource/fsource_LIST_CI_Models__modelstranslations.php.html#a10">10</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated on Fri, 13 Sep 2013 12:32:58 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>